package com.school.appleforgetbackend.controller;

import com.school.appleforgetbackend.BO.request.SwxxRequest;
import com.school.appleforgetbackend.BO.response.*;
import com.school.appleforgetbackend.service.UnderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * 试验场
 * **/
@Controller
@RequestMapping("/api/aqr/test")
public class TestController {

    @Autowired
    private UnderService underService;

    /**
     * 场景融合-试验列表数据
     **/
    @RequestMapping(value = "/test-project/list")
    @ResponseBody
    public ExperimentResponse getTestList(@RequestBody SwxxRequest swxxRequest) {
        ExperimentResponse experimentResponse = underService.getTestList(swxxRequest);
        System.out.println(experimentResponse);
        return experimentResponse;
    }
    /**
     * 场景融合-所绑定设备
     **/
    @RequestMapping(value = "/test-resource/list")
    @ResponseBody
    public BDExperimentResponse getTestResourceList(@RequestBody SwxxRequest swxxRequest) {
        BDExperimentResponse bDExperimentResponse = underService.getTestResourceList(swxxRequest);
        System.out.println(bDExperimentResponse);
        return bDExperimentResponse;
    }

}

